home *** CD-ROM | disk | FTP | other *** search
- *****Listing 2*****
-
- double d[5] = {1., 2., 3., 4., 5.};
- /* Assume this starts address 100 */
- double *ch;
- double e;
-
- ch = d; /* 100 placed into ch */
-
- *(ch++) = 5.; /* 5. placed in d[0]
- ch incremented to 108.
-
- ++(*ch); /* Contents of d[1] (at address 108)
- incremented by 1, to 3. */
-
- *(++ch) = 7.; /* ch incremented to 116
- 7. placed in d[2] (at address 116) */
-
- (*ch)++ /* The 7. at d[2] is incremented to 8. */
-
- e = ++(*ch); /* The 8. at d[2] is incremented to 9.
- 9. is placed in e */
-
- e = (*ch)++; /* The 9. at d[2] is placed in e
- d[2] is incremented to 10. */
-
-